2020-2021 Sunseeker Telemetry and Lighting System
Ref_examples_list

REF - ADC12, Using REF Module to control Internal Reference

This example shows how to configure the internal reference of REF module using the REFCTL0 control register. The ADC12 uses the internal 2.5V reference and performs a single conversion on channel A0. The conversion results are stored in ADC12MEM0. Test by applying a voltage to channel A0, then setting and running to a break point at the "__no_operation()" instruction. To view the conversion results, open an ADC12 register window in debugger and view the contents of ADC12MEM0.

NOTE: REFMSTR bit in REFCTL0 regsiter is by default set to 1. This allows the REFCTL0 control regsiters to configure the reference setting. The legacy ADC12 reference control bits ADC12REFON, ADC12REF2_5, ADC12TCOFF and ADC12REFOUT are dont care in this case.

     Tested on MSP430F5529
       -----------------
   /|\|                 |
    | |                 |
    --|RST              |
      |                 |
      |          P6.0/A0|<- Vin
      |                 |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.